//
//  LoginViewController.m
//  Work
//
//  Created by 任文义 on 15/12/15.
//  Copyright (c) 2015年 work. All rights reserved.
//

#import "LoginViewController.h"
#import "WebTool.h"
@interface LoginViewController ()<UIWebViewDelegate,NSURLConnectionDelegate>

@end

@implementation LoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
       self.navigationController.navigationBarHidden = YES;
    NSMutableURLRequest *urlRequest = [[NSMutableURLRequest alloc]initWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://www.sunways-portal.com/phone/phone.ActionLogin.do?userName=sunwsys&passWord=123456&language=English"]] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:3];
   
        
        NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:urlRequest delegate:self startImmediately:YES];
    
        [urlRequest setTimeoutInterval:3];
        UIWebView *webView  =  [WebTool webViewCreatWithString:@"http://www.sunways-portal.com/phone/phone.ActionLogin.do?userName=sunwsys&passWord=123456&language=English" WithIsScrollEnable:YES];
        webView.delegate = self;
        [self.view addSubview:webView];
   
    
   
}
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{



}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
